This application is based on an application No. 10-254355 filed in Japan, the content of which is hereby incorporated by reference.
(1) Field of the Invention
The present invention relates to a conversion device for converting coordinates input by a coordinate input device such as a touch panel, and especially relates to the improvement of a calibration technology with which the position of an image on a display is matched to a position detected at the time of an input operation using the touch panel.
(2) Description of the Prior Art
Recently, touch panels have been widely used as an input device of computers.
A touch panel is a kind of light-transparent two-dimensional coordinate input device. More specifically, a touch panel is composed of a transparent material and is provided on the surface of an image display such as a liquid crystal display. When the user depresses the touch panel with a pen or finger, the touch panel detects the two-dimensional coordinates (x,y) corresponding to the position that is depressed and informs the computer of the detected coordinates.
A touch panel transfers data to the device driver for the touch panel that is a program in the computer via the communication port of the computer.
The device driver for a touch panel converts the coordinates that have been detected by the touch panel in the two-dimensional coordinate system inherent for the touch panel into coordinates in the image-displaying two-dimensional coordinate system, and transfers the converted coordinates to the operating system (referred to as the xe2x80x9cOSxe2x80x9d in this specification). In addition, the device driver exercises control inherent for the touch panel.
Here, the image-displaying two-dimensional coordinate system is a coordinate system used in the OS running on the computer for displaying images on the display.
For instance, coordinates within the range that is displayed on the display in the image-displaying two-dimensional coordinate system are given by (P,Q) [0xe2x89xa6Pxe2x89xa665535,0xe2x89xa6Qxe2x89xa665535]. Here, the xe2x80x9cPxe2x80x9d indicates a horizontal coordinate and the xe2x80x9cQxe2x80x9d indicates a vertical coordinate.
On the other hand, two-dimensional coordinates in the touch-panel-inherent two-dimensional coordinate system are given by (X,Y) [0xe2x89xa6Xxe2x89xa61023,0xe2x89xa6Yxe2x89xa61023]. In the coordinate system, the coordinates corresponding to the upper left corner of the touch panel provided on the display is (0,0), the upper right corner is (1023,0), and the lower left corner is (0, 1023).
The OS defines the interface for receiving coordinates from the coordinate input device such as a mouse and a touch panel, and the received coordinates are transferred to application programs running under the control of the OS. For instance, when the user depresses the touch panel by depressing an icon on the display with a finger, the same operation is to be executed on the computer as the user puts the cursor on the icon with a mouse and click the mouse on the icon.
Note that since the touch-panel-inherent two-dimensional coordinate system is different from the image-displaying two-dimensional coordinate system, the coordinates of an image on the display needs to be matched to coordinates input by the touch panel. For this purpose, calibration is performed. Calibration is performed using a dedicated control program and expressions for coordinate transformation are obtained in advance so that the touch-panel device driver converts two-dimensional coordinates that have been transmitted from the touch panel via the communication port into coordinates in the image-displaying two-dimensional coordinate system.
Here, an explanation of the process of the calibration by a conventional control program will be given.
The calibration process by the conventional control program is to specify Expressions 1 and 2 as coordinate transformation expressions for calculating two-dimensional coordinates (P,Q) in the image-displaying two-dimensional coordinate system from input coordinates (X,Y) in the touch-panel-inherent coordinate system. The Expressions 1 and 2 are given below.
P=aX+bxe2x80x83xe2x80x83(Expression 1)
Q=cY+dxe2x80x83xe2x80x83(Expression 2)
FIG. 1 is a flowchart illustrating the conventional calibration processing according to a control program.
The control program notifies the touch-panel device driver of the start of the calibration processing (step S901). After the notification, the touch-panel device driver informs the OS of coordinates that have been transmitted from the touch panel in the touch-panel-inherent coordinate system without conversion until the notification of the end of the calibration processing. As a result, after the notification at step S901, the control program receives coordinates in the touch-panel-inherent coordinate system via the OS.
The control program displays a message that requests the user to depress a mark with a pen (step S902) and displays the image of the mark at coordinates (13106,13106) in the image-displaying two-dimensional coordinate system (step S903).
FIG. 2 shows a mark image displayed in the calibration process and how the user depresses the touch panel with a pen to indicate the mark.
As a result of step S903, an xe2x80x9cXxe2x80x9d mark is displayed at the upper left of the display screen on which a touch panel is provided as shown in a condition 921.
Note that the upper left corner and the lower right corner of the display are supposed to be indicated as two-dimensional coordinates (0,0) and (65535,65535) in the image-displaying two-dimensional coordinate system respectively. The control program displays an image at any position on the display via the OS by transferring two-dimensional coordinates in the image-displaying two-dimensional coordinate system to the OS.
A condition 922 shows how the user depresses the touch panel with a pen to indicate the mark image.
When the user depresses the touch panel as shown in the condition 922, the touch panel detects the depressed position and informs the touch-panel device driver of the detected position as the two-dimensional coordinates in the touch-panel-inherent coordinate system via the communication port.
The touch-panel device driver informs the OS of the coordinates transmitted from the touch panel as they are.
The control program obtains the co-ordinates via the OS that the user has depressed (step S904). The obtained coordinates are supposed to be coordinates (X1,Y1). At step S904, the process stops and awaits the obtainment of coordinates by the control program.
After obtaining the coordinates (X1,Y1), the control program displays another mark image at coordinates (52429,52429) in the image-displaying two-dimensional coordinate system (step S905).
After displaying the mark image, the control program obtains coordinates in the touch-panel-inherent coordinate system according to the depression of the touch panel by the user as at step S904 (step S906). The coordinates obtained at step S906 are supposed to be coordinates (X2,Y2) After obtaining the coordinates (X2,Y2), the control program substitutes coordinates (13106,13106) and (52429,52429) into the (P, Q) and coordinates (X1,Y1) and (X2,Y2) into the (X,Y) in Expressions 1 and 2, which each are coordinate transformation expressions, respectively to obtain coefficients xe2x80x9caxe2x80x9d, xe2x80x9cbxe2x80x9d, xe2x80x9ccxe2x80x9d, and xe2x80x9cdxe2x80x9d in the Expressions 1 and 2 and records the coefficients in a file (step S907).
Here, the coefficients xe2x80x9caxe2x80x9d, xe2x80x9cbxe2x80x9d, xe2x80x9ccxe2x80x9d, xe2x80x9cfxe2x80x9d, and xe2x80x9cdxe2x80x9d are calculated according to Expressions 3 to 6 given below.
a=(52429xe2x88x9213106)/(X2xe2x88x92X1)xe2x80x83xe2x80x83(Expression 3)
b=13106xe2x88x92X1(52429xe2x88x9213106)/(X2xe2x88x92X1)xe2x80x83xe2x80x83(Expression 4)
c=(52429xe2x88x9213106)/(Y2xe2x88x92Y1)xe2x80x83xe2x80x83(Expression 5)
d=13106xe2x88x92Y1(52429xe2x88x9213106)/(Y2xe2x88x92Y1)xe2x80x83xe2x80x83(Expression 6)
The file in which the coefficients xe2x80x9caxe2x80x9d, xe2x80x9cbxe2x80x9d, xe2x80x9ccxe2x80x9d, and xe2x80x9cdxe2x80x9d are recorded is referred to by the touch-panel device driver at the start-up time of the OS. After that the touch-panel device driver converts coordinates in the touch-panel-inherent coordinate system into coordinates in the image-displaying two-dimensional coordinate system according to the Expressions 1 and 2 in which the value of the coefficients have been fixed.
After obtaining the coefficients xe2x80x9caxe2x80x9d, xe2x80x9cbxe2x80x9d, xe2x80x9ccxe2x80x9d, and xe2x80x9cdxe2x80x9d, the control program displays a message indicating the completion of the calibration process on the display screen (step S908) and informs the touch-panel device driver of the completion of the calibration process (step S909).
Note that when informing that the calibration process is completed, the control program informs the touch-panel device driver of the values of the coefficients xe2x80x9caxe2x80x9d, xe2x80x9cbxe2x80x9d, xe2x80x9ccxe2x80x9d, and xe2x80x9cdxe2x80x9d.
After informed of the completion of the calibration process, the touch-panel device driver converts the coordinates that have been detected by the touch panel into coordinates in the image-displaying two-dimensional coordinate system according to the Expressions 1 and 2 that are coordinate transformation expressions in which the coefficients xe2x80x9caxe2x80x9d, xe2x80x9cbxe2x80x9d, xe2x80x9ccxe2x80x9d, and xe2x80x9cdxe2x80x9d have been fixed, and informs the OS of the obtained coordinates. More specifically, when the coordinates that have been detected by the touch panel as the coordinates of the position depressed by the user are supposed to be coordinates (X,Y), the touch-panel device driver calculates xe2x80x9cPxe2x80x9d and xe2x80x9cQxe2x80x9d according to the coordinates (X,Y) using the Expressions 1 and 2, and informs the OS of the calculated coordinates (P,Q).
As has been described, a conventional control program performs the calibration process by having the user depress two positions on the touch panel corresponding to the two mark images on the display screen, and a touch-panel device driver converts coordinates in the touch-panel-inherent coordinate system into coordinates in the image-displaying two-dimensional coordinate system using the Expressions 1 and 2.
Note that the recent research by the inventors of the present invention has revealed that the X and Y-axes of the two-dimensional coordinate system of a touch panel may not exactly intersect orthogonally, or the touch panel may be shifted in the rotation direction at the time of being providing on the display even when the X and Y-axes of the coordinate system of the touch panel exactly intersect orthogonally.
In addition, since an image-displaying two-dimensional coordinate system is defined by the software of an OS and the like, it is not fixed whether the origin is located at the lower left corner, the lower right corner, or another position of the liquid crystal display on which a touch panel is provided. As a result, the image-displaying two-dimensional coordinate system and the touch-panel-inherent two-dimensional coordinate system may have a relation of a 90-degree rotation and the like.
In these cases, the accuracy of the coordinate transformation using the coordinate transformation expressions, Expressions 1 and 2 is low. More specifically, a conventional touch-panel device driver cannot absorb the disagreement between the image-displaying two-dimensional coordinate system according to which images are displayed on the display and the touch-panel-inherent two-dimensional coordinate system. As a result, the user cannot accurately designate a position on a graphical user interface displayed on the display via the touch panel.
It is accordingly an object of the present invention to provide an input coordinate transformation apparatus that converts coordinates in a coordinate system inherent in a light-transparent two-dimensional coordinate input device such as a touch panel into coordinates in an image-displaying two-dimensional coordinate system more correctly than a conventional coordinate transformation apparatus when the image-displaying two-dimensional coordinate system and the coordinate system inherent in the light-transparent two-dimensional coordinate input device have a relation of any degree of rotation and when the axes do not orthogonally intersect in the coordinate system inherent in the light-transparent two-dimensional coordinate input device. The object of the present invention is to provide an input coordinate transformation method corresponding to the input coordinate transformation apparatus and a display device that realizes the input coordinate transformation apparatus and includes a display.
The above-mentioned object may be achieved by an input coordinate transformation apparatus that converts input coordinates (x,y) into two-dimensional coordinates in an image-displaying two-dimensional coordinate system, the input coordinates (x,y) having been detected in a two-dimensional coordinate system inherent in a light-transparent two-dimensional coordinate input device provided on a display screen by the light-transparent two-dimensional coordinate input device according to reception of user operation, the input coordinate transformation apparatus that informs a computer of the two-dimensional coordinates, the computer having a function of displaying images on the display screen whose positions have been designated using the image-displaying two-dimensional coordinate system, the input coordinate transformation apparatus, may include: a transform function specifying unit for specifying transform functions F(x,y) and G(x,y), which each include variables xe2x80x9cxxe2x80x9d and xe2x80x9cyxe2x80x9d and terms of first degree for the variables xe2x80x9cxxe2x80x9d and xe2x80x9cyxe2x80x9d; and a coordinate transformation unit for converting the input coordinates (x,y) into two-dimensional coordinates (F(x,y), G(x,y)) in the image-displaying two-dimensional coordinate system using the transform functions that the transform function specifying unit has specified and for informing the computer of the two-dimensional coordinates (F(x,y), G(x,y)).
In the input coordinate transformation apparatus, the coordinate transformation expressions are both functions that include variables xe2x80x9cxxe2x80x9d and xe2x80x9cyxe2x80x9d and reflect the components of the dimensions of two-dimensional coordinates in the two-dimensional coordinate system inherent in the light-transparent two-dimensional coordinate input apparatus such as a touch panel when coordinates in the image-displaying coordinate system are converted into coordinate in the two-dimensional coordinate system inherent in the light-transparent two-dimensional coordinate input apparatus. As a result, coordinates in the coordinate system inherent in the light-transparent two-dimensional coordinate input apparatus such as a touch panel may be converted into coordinates in the image-displaying two-dimensional coordinate system more correctly than in conventional coordinate transformation even when the two-dimensional coordinate system inherent in a touch panel and the like and the image-displaying two-dimensional coordinate system have a relation of any degree of rotation and even when the axes do not orthogonally intersect in the two-dimensional coordinate system inherent in a touch panel and the like.
The above-mentioned object may be also achieved by the input coordinate transformation apparatus, the input coordinate transformation apparatus may further include: an adjustment input coordinate storage unit that is an area for storing xe2x80x9cnxe2x80x9d [xe2x80x9cnxe2x80x9d is a natural number equal to or greater than 3] two-dimensional coordinates; a displayed coordinate storage unit for storing xe2x80x9cnxe2x80x9d two-dimensional coordinates (Pm,Qm) [xe2x80x9cmxe2x80x9d=natural numbers from 1 to xe2x80x9cnxe2x80x9d] in the image-displaying two-dimensional coordinate system; and an adjustment input receiving unit for designating positions using the xe2x80x9cnxe2x80x9d two-dimensional coordinates that have been stored in the displayed coordinate storage unit, having the computer display images of marks on the display screen that indicate input positions, receiving user operation corresponding to the marks, obtaining xe2x80x9cnxe2x80x9d input coordinates (Xm,Ym) [xe2x80x9cmxe2x80x9d=natural numbers from 1 to xe2x80x9cnxe2x80x9d] that have been detected by the light-transparent two-dimensional coordinate input device, and storing the obtained input coordinates (Xm,Ym) in the adjustment input coordinate storage unit, wherein the transform function specifying unit includes a coefficient specifying unit for specifying, after the adjustment input receiving unit has stored the input coordinates (Xm,Ym) in the adjustment input coordinate storage unit, coefficients of the transform functions F(x,y) and G(x,y) so that the transform functions satisfy expressions Pm=F(Xm,Ym) [xe2x80x9cmxe2x80x9d=natural numbers from 1 to xe2x80x9cnxe2x80x9d] and Qm=G(Xm,Ym) [xe2x80x9cmxe2x80x9d=natural numbers from 1 to xe2x80x9cnxe2x80x9d] according to the input coordinates (Xm,Ym) [xe2x80x9cmxe2x80x9d=natural numbers from 1 to xe2x80x9cnxe2x80x9d] and the two-dimensional coordinates (Pm,Qm) [xe2x80x9cmxe2x80x9d=natural numbers from 1 to xe2x80x9cnxe2x80x9d].
In the input coordinate transformation apparatus, the coefficients in the coordinate transformation expressions may be specified by calibration process, so that the individual difference of light-transparent two-dimensional coordinate input apparatus such as touch panel may be absorbed.
More specifically, even when the touch panel is shifted to some extent at the time of being providing on the display in a manufacturing step and when the origin that the operation system has determined is located at the upper left corner, the lower left corner, the upper right corner, and the lower right corner, calibration process may adjust the relation between input positions using the touch panel and the positions of images on the display.
The above-mentioned object may be also achieved by the input coordinate transformation apparatus, wherein the xe2x80x9cnxe2x80x9d is equal to 4, the transform function F(x,y) is expressed as xe2x80x9cex+fy+gxy+hxe2x80x9d using coefficients xe2x80x9cexe2x80x9d, xe2x80x9cfxe2x80x9d, xe2x80x9cgxe2x80x9d, and xe2x80x9chxe2x80x9d, the transform function G(x,y) is expressed as xe2x80x9cix+jy+kxy+lxe2x80x9d using coefficients xe2x80x9cixe2x80x9d, xe2x80x9cjxe2x80x9d, xe2x80x9ckxe2x80x9d, and xe2x80x9clxe2x80x9d, and the coefficient specifying unit specifies the coefficients xe2x80x9cexe2x80x9d, xe2x80x9cfxe2x80x9d, xe2x80x9cgxe2x80x9d, xe2x80x9chxe2x80x9d, xe2x80x9cixe2x80x9d, xe2x80x9cjxe2x80x9d, xe2x80x9ckxe2x80x9d, and xe2x80x9clxe2x80x9d so that the expressions Pm=F(Xm,Ym) [xe2x80x9cmxe2x80x9d=1, 2, 3, and 4] and Qm=G(Xm,Ym) [xe2x80x9cmxe2x80x9d=1, 2, 3, and 4] are satisfied according to the input coordinates (Xm,Ym) [xe2x80x9cmxe2x80x9d=1, 2, 3, and 4] and the two-dimensional coordinates (Pm,Qm) [xe2x80x9cmxe2x80x9d=1, 2, 3, and 4].
In the input coordinate transformation apparatus, even when the touch panel is shifted at the time of being providing on the display, the user depresses only four positions on the touch panel for calibration. After that, any pixel on the display may be correctly designated as a result of the calibration.
The above-mentioned object may be also achieved by the input coordinate transformation apparatus, wherein the four two-dimensional coordinates that have been stored in the displayed coordinate storage unit are located at vertices of a quadrangle on a two-dimensional coordinate plane.
In the input coordinate transformation apparatus, four positions that are not overlapped but have different characteristics on the light-transparent two-dimensional coordinate input device such as a touch panel are used for the calibration. As a result, the accuracy of coordinate transformation may be improved.
The above-mentioned object may be also achieved by the input coordinate transformation apparatus, wherein the light-transparent two-dimensional coordinate input device is a touch panel that detects positions depressed by a user as input coordinates.
In the input coordinate transformation apparatus, the coordinate transformation expressions are both functions that include variables xe2x80x9cxxe2x80x9d and xe2x80x9cyxe2x80x9d and reflect the components of the dimensions of two-dimensional coordinates in the two-dimensional coordinate system inherent in the touch panel when coordinates in the image-displaying coordinate system are converted into coordinate in the two-dimensional coordinate system inherent in the light-transparent two-dimensional coordinate input apparatus. As a result, coordinates in the touch-panel-inherent coordinate system may be converted into coordinates in the image-displaying two-dimensional coordinate system more correctly than in conventional coordinate transformation even when the touch-panel-inherent two-dimensional coordinate system and the image-displaying two-dimensional coordinate system have a relation of any degree of rotation and the axes do not orthogonally intersect in the touch-panel-inherent two-dimensional coordinate system.